package com.app.view.component.room.exps 
{
	
	import com.peachcastle.core.Display;
	import flash.display.MovieClip;
	
	import com.greensock.TweenLite;
	
	/**
	 * ...
	 * @author kevin
	 */
	public class ExpView extends Display
	{
		public function ExpView(ui:MovieClip = null) 
		{
			super(ui, true);
		}
		
		public function onExpShow(exp:int):void
		{
			super.showAssest();
			
			assest["text"].text = "+" + String(exp);
			TweenLite.to(assest, .7, { alpha:1, y:assest.y - 20 } );
			
			TweenLite.delayedCall(.7, onExpHide);
		}
		
		private function onExpHide():void
		{
			TweenLite.to(assest, 1.5, { alpha:0, y:assest.y - 50, onComplete: super.hideAssest} );
		}
		
	}

}